Logical expressions are, like comparison expressions, usually used for If
statements and Loop
statements.
For example, the statement Index <= 10 and Done = 0
tests whether the variable Index is less than or equal to 10 and whether the variable Done equals 0.
The statement LotteryNumber >= 6 and LotteryNumber <= 49
tests whether the variable LotteryNumber is between 6 and 49.
The statement Index < 1 or Index > 10
tests whether the variable Index is out of the range 1 to 10.
The statement not (Index < 1 or Index > 10)
tests whether the variable Index is in the range 1 to 10.